package com.xzh.gulimall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xzh.common.to.mq.SeckillOrderTo;
import com.xzh.common.utils.PageUtils;
import com.xzh.gulimall.order.entity.OrderEntity;
import com.xzh.gulimall.order.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author xzh
 * @email 1835674381@qq.com
 * @date 2022-07-23 16:25:51
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    //给订单确认页返回需要用的数据
    OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;

    //下单
    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo);

    OrderEntity getOrderByOrderSn(String orderSn);

    void closeOrder(OrderEntity entity);

    //获取当前订单的支付信息
    PayVo getOrderPay(String orderSn);

    PageUtils queryPageWithItem(Map<String, Object> params);

    //处理支付宝的返回数据
    String handlePayResult(PayAsyncVo vo);

    void createSeckillOrder(SeckillOrderTo seckillOrder);
}

